package com.zn.product.controller;

import com.zn.product.controller.ProductListController;
import com.zn.product.model.Product;
import com.zn.product.service.ProductService;
import jdk.jshell.execution.Util;

import javax.servlet.ServletException;
import javax.servlet.annotation.WebServlet;
import javax.servlet.http.HttpServlet;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import java.io.IOException;
import java.util.List;

@WebServlet("/productList.do")
public class ProductListController extends HttpServlet {
    private Util til;

    @Override
    protected void doGet(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException {
        super.doGet(req, resp);
    }

    @Override
    protected void doPost(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException {
        ProductService service = new ProductService();
        super.doPost(req, resp);
        List<Product> list = service.getProductList();

    }
}
